3.458 \(\int \frac{\sec ^4(c+d x) (A+B \sec (c+d x)+C \sec ^2(c+d x))}{(a+a \sec (c+d x))^2} \, dx\)
Optimal. Leaf size=194 \[ \frac{(5 A-8 B+12 C) \tan ^3(c+d x)}{3 a^2 d}+\frac{(5 A-8 B+12 C) \tan (c+d x)}{a^2 d}-\frac{(4 A-7 B+10 C) \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}-\frac{(4 A-7 B+10 C) \tan (c+d x) \sec ^3(c+d x)}{3 a^2 d (\sec (c+d x)+1)}-\frac{(4 A-7 B+10 C) \tan (c+d x) \sec (c+d x)}{2 a^2 d}-\frac{(A-B+C) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
[Out]
-((4*A - 7*B + 10*C)*ArcTanh[Sin[c + d*x]])/(2*a^2*d) + ((5*A - 8*B + 12*C)*Tan[c + d*x])/(a^2*d) - ((4*A - 7*
B + 10*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*d) - ((4*A - 7*B + 10*C)*Sec[c + d*x]^3*Tan[c + d*x])/(3*a^2*d*(1
+ Sec[c + d*x])) - ((A - B + C)*Sec[c + d*x]^4*Tan[c + d*x])/(3*d*(a + a*Sec[c + d*x])^2) + ((5*A - 8*B + 12*C
)*Tan[c + d*x]^3)/(3*a^2*d)
________________________________________________________________________________________
Rubi [A] time = 0.363064, antiderivative size = 194, normalized size of antiderivative = 1.,
number of steps used = 7, number of rules used = 6, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.146, Rules used =
{4084, 4019, 3787, 3768, 3770, 3767} \[ \frac{(5 A-8 B+12 C) \tan ^3(c+d x)}{3 a^2 d}+\frac{(5 A-8 B+12 C) \tan (c+d x)}{a^2 d}-\frac{(4 A-7 B+10 C) \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}-\frac{(4 A-7 B+10 C) \tan (c+d x) \sec ^3(c+d x)}{3 a^2 d (\sec (c+d x)+1)}-\frac{(4 A-7 B+10 C) \tan (c+d x) \sec (c+d x)}{2 a^2 d}-\frac{(A-B+C) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2} \]
Antiderivative was successfully verified.
[In]
Int[(Sec[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + a*Sec[c + d*x])^2,x]
[Out]
-((4*A - 7*B + 10*C)*ArcTanh[Sin[c + d*x]])/(2*a^2*d) + ((5*A - 8*B + 12*C)*Tan[c + d*x])/(a^2*d) - ((4*A - 7*
B + 10*C)*Sec[c + d*x]*Tan[c + d*x])/(2*a^2*d) - ((4*A - 7*B + 10*C)*Sec[c + d*x]^3*Tan[c + d*x])/(3*a^2*d*(1
+ Sec[c + d*x])) - ((A - B + C)*Sec[c + d*x]^4*Tan[c + d*x])/(3*d*(a + a*Sec[c + d*x])^2) + ((5*A - 8*B + 12*C
)*Tan[c + d*x]^3)/(3*a^2*d)
Rule 4084
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Simp[((a*A - b*B + a*C)*Cot[e + f*x]*(a + b*Cs
c[e + f*x])^m*(d*Csc[e + f*x])^n)/(a*f*(2*m + 1)), x] - Dist[1/(a*b*(2*m + 1)), Int[(a + b*Csc[e + f*x])^(m +
1)*(d*Csc[e + f*x])^n*Simp[a*B*n - b*C*n - A*b*(2*m + n + 1) - (b*B*(m + n + 1) - a*(A*(m + n + 1) - C*(m - n)
))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]
Rule 4019
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[(d*(A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n - 1))/
(a*f*(2*m + 1)), x] - Dist[1/(a*b*(2*m + 1)), Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^(n - 1)*Simp[A
*(a*d*(n - 1)) - B*(b*d*(n - 1)) - d*(a*B*(m - n + 1) + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b,
d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0]
Rule 3787
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Rule 3768
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]
Rule 3770
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rule 3767
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Rubi steps
\begin{align*} \int \frac{\sec ^4(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx &=-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac{\int \frac{\sec ^4(c+d x) (-a (A-4 B+4 C)+3 a (A-B+2 C) \sec (c+d x))}{a+a \sec (c+d x)} \, dx}{3 a^2}\\ &=-\frac{(4 A-7 B+10 C) \sec ^3(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac{\int \sec ^3(c+d x) \left (-3 a^2 (4 A-7 B+10 C)+3 a^2 (5 A-8 B+12 C) \sec (c+d x)\right ) \, dx}{3 a^4}\\ &=-\frac{(4 A-7 B+10 C) \sec ^3(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac{(4 A-7 B+10 C) \int \sec ^3(c+d x) \, dx}{a^2}+\frac{(5 A-8 B+12 C) \int \sec ^4(c+d x) \, dx}{a^2}\\ &=-\frac{(4 A-7 B+10 C) \sec (c+d x) \tan (c+d x)}{2 a^2 d}-\frac{(4 A-7 B+10 C) \sec ^3(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac{(4 A-7 B+10 C) \int \sec (c+d x) \, dx}{2 a^2}-\frac{(5 A-8 B+12 C) \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{a^2 d}\\ &=-\frac{(4 A-7 B+10 C) \tanh ^{-1}(\sin (c+d x))}{2 a^2 d}+\frac{(5 A-8 B+12 C) \tan (c+d x)}{a^2 d}-\frac{(4 A-7 B+10 C) \sec (c+d x) \tan (c+d x)}{2 a^2 d}-\frac{(4 A-7 B+10 C) \sec ^3(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}-\frac{(A-B+C) \sec ^4(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}+\frac{(5 A-8 B+12 C) \tan ^3(c+d x)}{3 a^2 d}\\ \end{align*}
Mathematica [B] time = 6.42222, size = 1069, normalized size = 5.51 \[ \text{result too large to display} \]
Antiderivative was successfully verified.
[In]
Integrate[(Sec[c + d*x]^4*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(a + a*Sec[c + d*x])^2,x]
[Out]
(4*(4*A - 7*B + 10*C)*Cos[c/2 + (d*x)/2]^4*Log[Cos[c/2 + (d*x)/2] - Sin[c/2 + (d*x)/2]]*(A + B*Sec[c + d*x] +
C*Sec[c + d*x]^2))/(d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^2) - (4*(4*A - 7*
B + 10*C)*Cos[c/2 + (d*x)/2]^4*Log[Cos[c/2 + (d*x)/2] + Sin[c/2 + (d*x)/2]]*(A + B*Sec[c + d*x] + C*Sec[c + d*
x]^2))/(d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^2) + (Cos[c/2 + (d*x)/2]*Sec[
c/2]*Sec[c]*Sec[c + d*x]^3*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(-48*A*Sin[(d*x)/2] + 45*B*Sin[(d*x)/2] - 6
*C*Sin[(d*x)/2] + 132*A*Sin[(3*d*x)/2] - 201*B*Sin[(3*d*x)/2] + 310*C*Sin[(3*d*x)/2] - 120*A*Sin[c - (d*x)/2]
+ 195*B*Sin[c - (d*x)/2] - 306*C*Sin[c - (d*x)/2] + 48*A*Sin[c + (d*x)/2] - 51*B*Sin[c + (d*x)/2] + 42*C*Sin[c
+ (d*x)/2] - 120*A*Sin[2*c + (d*x)/2] + 189*B*Sin[2*c + (d*x)/2] - 270*C*Sin[2*c + (d*x)/2] - 8*A*Sin[c + (3*
d*x)/2] - B*Sin[c + (3*d*x)/2] + 50*C*Sin[c + (3*d*x)/2] + 72*A*Sin[2*c + (3*d*x)/2] - 81*B*Sin[2*c + (3*d*x)/
2] + 90*C*Sin[2*c + (3*d*x)/2] - 68*A*Sin[3*c + (3*d*x)/2] + 119*B*Sin[3*c + (3*d*x)/2] - 170*C*Sin[3*c + (3*d
*x)/2] + 84*A*Sin[c + (5*d*x)/2] - 129*B*Sin[c + (5*d*x)/2] + 198*C*Sin[c + (5*d*x)/2] - 9*B*Sin[2*c + (5*d*x)
/2] + 42*C*Sin[2*c + (5*d*x)/2] + 48*A*Sin[3*c + (5*d*x)/2] - 57*B*Sin[3*c + (5*d*x)/2] + 66*C*Sin[3*c + (5*d*
x)/2] - 36*A*Sin[4*c + (5*d*x)/2] + 63*B*Sin[4*c + (5*d*x)/2] - 90*C*Sin[4*c + (5*d*x)/2] + 48*A*Sin[2*c + (7*
d*x)/2] - 75*B*Sin[2*c + (7*d*x)/2] + 114*C*Sin[2*c + (7*d*x)/2] + 6*A*Sin[3*c + (7*d*x)/2] - 15*B*Sin[3*c + (
7*d*x)/2] + 36*C*Sin[3*c + (7*d*x)/2] + 30*A*Sin[4*c + (7*d*x)/2] - 39*B*Sin[4*c + (7*d*x)/2] + 48*C*Sin[4*c +
(7*d*x)/2] - 12*A*Sin[5*c + (7*d*x)/2] + 21*B*Sin[5*c + (7*d*x)/2] - 30*C*Sin[5*c + (7*d*x)/2] + 20*A*Sin[3*c
+ (9*d*x)/2] - 32*B*Sin[3*c + (9*d*x)/2] + 48*C*Sin[3*c + (9*d*x)/2] + 6*A*Sin[4*c + (9*d*x)/2] - 12*B*Sin[4*
c + (9*d*x)/2] + 22*C*Sin[4*c + (9*d*x)/2] + 14*A*Sin[5*c + (9*d*x)/2] - 20*B*Sin[5*c + (9*d*x)/2] + 26*C*Sin[
5*c + (9*d*x)/2]))/(48*d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])^2)
________________________________________________________________________________________
Maple [B] time = 0.079, size = 506, normalized size = 2.6 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(sec(d*x+c)^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^2,x)
[Out]
1/6/d/a^2*tan(1/2*d*x+1/2*c)^3*A-1/6/d/a^2*tan(1/2*d*x+1/2*c)^3*B+1/6/d/a^2*C*tan(1/2*d*x+1/2*c)^3+5/2/d/a^2*A
*tan(1/2*d*x+1/2*c)-7/2/d/a^2*B*tan(1/2*d*x+1/2*c)+9/2/d/a^2*C*tan(1/2*d*x+1/2*c)+3/2/d/a^2*C/(tan(1/2*d*x+1/2
*c)+1)^2-1/2/d/a^2/(tan(1/2*d*x+1/2*c)+1)^2*B-1/d/a^2/(tan(1/2*d*x+1/2*c)+1)*A+5/2/d/a^2/(tan(1/2*d*x+1/2*c)+1
)*B-5/d/a^2/(tan(1/2*d*x+1/2*c)+1)*C-2/d/a^2*ln(tan(1/2*d*x+1/2*c)+1)*A+7/2/d/a^2*ln(tan(1/2*d*x+1/2*c)+1)*B-5
/d/a^2*ln(tan(1/2*d*x+1/2*c)+1)*C-1/3/d/a^2*C/(tan(1/2*d*x+1/2*c)+1)^3+1/2/d/a^2/(tan(1/2*d*x+1/2*c)-1)^2*B-3/
2/d/a^2*C/(tan(1/2*d*x+1/2*c)-1)^2-1/d/a^2/(tan(1/2*d*x+1/2*c)-1)*A+5/2/d/a^2/(tan(1/2*d*x+1/2*c)-1)*B-5/d/a^2
/(tan(1/2*d*x+1/2*c)-1)*C+2/d/a^2*ln(tan(1/2*d*x+1/2*c)-1)*A-7/2/d/a^2*ln(tan(1/2*d*x+1/2*c)-1)*B+5/d/a^2*ln(t
an(1/2*d*x+1/2*c)-1)*C-1/3/d/a^2*C/(tan(1/2*d*x+1/2*c)-1)^3
________________________________________________________________________________________
Maxima [B] time = 0.980584, size = 765, normalized size = 3.94 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^2,x, algorithm="maxima")
[Out]
1/6*(C*(4*(9*sin(d*x + c)/(cos(d*x + c) + 1) - 20*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 15*sin(d*x + c)^5/(cos
(d*x + c) + 1)^5)/(a^2 - 3*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 3*a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4
- a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6) + (27*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x +
c) + 1)^3)/a^2 - 30*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 30*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)
/a^2) - B*(6*(3*sin(d*x + c)/(cos(d*x + c) + 1) - 5*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(a^2 - 2*a^2*sin(d*x
+ c)^2/(cos(d*x + c) + 1)^2 + a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) + (21*sin(d*x + c)/(cos(d*x + c) + 1) +
sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 21*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 21*log(sin(d*x +
c)/(cos(d*x + c) + 1) - 1)/a^2) + A*((15*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^
3)/a^2 - 12*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 12*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2 + 1
2*sin(d*x + c)/((a^2 - a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1))))/d
________________________________________________________________________________________
Fricas [A] time = 0.5293, size = 689, normalized size = 3.55 \begin{align*} -\frac{3 \,{\left ({\left (4 \, A - 7 \, B + 10 \, C\right )} \cos \left (d x + c\right )^{5} + 2 \,{\left (4 \, A - 7 \, B + 10 \, C\right )} \cos \left (d x + c\right )^{4} +{\left (4 \, A - 7 \, B + 10 \, C\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \,{\left ({\left (4 \, A - 7 \, B + 10 \, C\right )} \cos \left (d x + c\right )^{5} + 2 \,{\left (4 \, A - 7 \, B + 10 \, C\right )} \cos \left (d x + c\right )^{4} +{\left (4 \, A - 7 \, B + 10 \, C\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \,{\left (4 \,{\left (5 \, A - 8 \, B + 12 \, C\right )} \cos \left (d x + c\right )^{4} +{\left (28 \, A - 43 \, B + 66 \, C\right )} \cos \left (d x + c\right )^{3} + 6 \,{\left (A - B + 2 \, C\right )} \cos \left (d x + c\right )^{2} +{\left (3 \, B - 2 \, C\right )} \cos \left (d x + c\right ) + 2 \, C\right )} \sin \left (d x + c\right )}{12 \,{\left (a^{2} d \cos \left (d x + c\right )^{5} + 2 \, a^{2} d \cos \left (d x + c\right )^{4} + a^{2} d \cos \left (d x + c\right )^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^2,x, algorithm="fricas")
[Out]
-1/12*(3*((4*A - 7*B + 10*C)*cos(d*x + c)^5 + 2*(4*A - 7*B + 10*C)*cos(d*x + c)^4 + (4*A - 7*B + 10*C)*cos(d*x
+ c)^3)*log(sin(d*x + c) + 1) - 3*((4*A - 7*B + 10*C)*cos(d*x + c)^5 + 2*(4*A - 7*B + 10*C)*cos(d*x + c)^4 +
(4*A - 7*B + 10*C)*cos(d*x + c)^3)*log(-sin(d*x + c) + 1) - 2*(4*(5*A - 8*B + 12*C)*cos(d*x + c)^4 + (28*A - 4
3*B + 66*C)*cos(d*x + c)^3 + 6*(A - B + 2*C)*cos(d*x + c)^2 + (3*B - 2*C)*cos(d*x + c) + 2*C)*sin(d*x + c))/(a
^2*d*cos(d*x + c)^5 + 2*a^2*d*cos(d*x + c)^4 + a^2*d*cos(d*x + c)^3)
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{A \sec ^{4}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec{\left (c + d x \right )} + 1}\, dx + \int \frac{B \sec ^{5}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec{\left (c + d x \right )} + 1}\, dx + \int \frac{C \sec ^{6}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec{\left (c + d x \right )} + 1}\, dx}{a^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)**4*(A+B*sec(d*x+c)+C*sec(d*x+c)**2)/(a+a*sec(d*x+c))**2,x)
[Out]
(Integral(A*sec(c + d*x)**4/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x) + Integral(B*sec(c + d*x)**5/(sec(c + d
*x)**2 + 2*sec(c + d*x) + 1), x) + Integral(C*sec(c + d*x)**6/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x))/a**2
________________________________________________________________________________________
Giac [A] time = 1.27143, size = 409, normalized size = 2.11 \begin{align*} -\frac{\frac{3 \,{\left (4 \, A - 7 \, B + 10 \, C\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac{3 \,{\left (4 \, A - 7 \, B + 10 \, C\right )} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac{2 \,{\left (6 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 15 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 30 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 12 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 24 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 40 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 6 \, A \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 9 \, B \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 18 \, C \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}^{3} a^{2}} - \frac{A a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - B a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + C a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 15 \, A a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 21 \, B a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 27 \, C a^{4} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{6}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^2,x, algorithm="giac")
[Out]
-1/6*(3*(4*A - 7*B + 10*C)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 3*(4*A - 7*B + 10*C)*log(abs(tan(1/2*d*x +
1/2*c) - 1))/a^2 + 2*(6*A*tan(1/2*d*x + 1/2*c)^5 - 15*B*tan(1/2*d*x + 1/2*c)^5 + 30*C*tan(1/2*d*x + 1/2*c)^5
- 12*A*tan(1/2*d*x + 1/2*c)^3 + 24*B*tan(1/2*d*x + 1/2*c)^3 - 40*C*tan(1/2*d*x + 1/2*c)^3 + 6*A*tan(1/2*d*x +
1/2*c) - 9*B*tan(1/2*d*x + 1/2*c) + 18*C*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^3*a^2) - (A*a^4*t
an(1/2*d*x + 1/2*c)^3 - B*a^4*tan(1/2*d*x + 1/2*c)^3 + C*a^4*tan(1/2*d*x + 1/2*c)^3 + 15*A*a^4*tan(1/2*d*x + 1
/2*c) - 21*B*a^4*tan(1/2*d*x + 1/2*c) + 27*C*a^4*tan(1/2*d*x + 1/2*c))/a^6)/d